//
//  HNSH_TZXFEDtopView.m
//  HNSH_SingleProject
//
//  Created by 李宇廷 on 2023/6/16.
//

#import "HNSH_TZXFEDtopView.h"

@implementation HNSH_TZXFEDtopView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        [self configUI];
    }
    return self;
}

- (void)configUI {
    UIImageView *bgImgV = [[UIImageView alloc]initWithFrame:CGRectMake(12, 12, kScreenWidth-24, 90)];
    bgImgV.image = [UIImage imageNamed:@"tz_xfed_top_bg"];
    [self addSubview:bgImgV];
    
    UILabel *titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 20, bgImgV.width, 17)];
    titleLabel.text = @"当前剩余消费额度";
    titleLabel.textColor = [UIColor colorWithHexString:@"#FFE5E3"];
    titleLabel.font = [UIFont systemFontOfSize:12];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    [bgImgV addSubview:titleLabel];
    self.titleLabel = titleLabel;
    
    UILabel *moneyLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 41, bgImgV.width, 30)];
    moneyLabel.text = @"";
    moneyLabel.textColor = [UIColor appWhiteLabelColor];
    moneyLabel.font = [UIFont boldSystemFontOfSize:22];
    moneyLabel.textAlignment = NSTextAlignmentCenter;
    [bgImgV addSubview:moneyLabel];
    self.moneyLabel = moneyLabel;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
